package org.jeecg.glr.service;

import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.glr.domain.glr.*;
import org.jeecg.glr.entity.GlrGateway;
import org.jeecg.glr.entity.GlrPattern;
import org.jeecg.glr.entity.GlrPatternGateway;
import org.jeecg.glr.util.ResponseMessage;

public interface IGateWayCommon extends IService<GlrGateway> {



    public Boolean ledOpenOrClose(GlrGateWayControlLight glrGateWayControlLight);

    /**
     * 获取网关状态
     * @param gateWayCode
     * @return
     */
    public ResponseMessage getGateWayStatus(String gateWayCode);

    /**
     * 读取网关时间
     * @return
     */
    public ResponseMessage readDate(DateTimeDomain dateTimeDomain);


    /**
     * 设置网关时间
     * @return
     */
    Boolean setDate(DateTimeDomain dateTimeDomain);

    /**
     * 读取分控网关
     * @return
     */
    ResponseMessage readLightGateWay(GataWayDomain gataWayDomain);


    /**
     * 读取网关信息
     * @param gataWayDomain
     * @return
     */
    Boolean readGateWay(GataWayDomain gataWayDomain);

    /**
     * 写入分控地址
     * @return
     */
    Boolean setLightGateWay(GlrGateWayLightGateWayDomain glrGateWayLightGateWayDomain);

    /**
     * 读取开关状态
     * @return
     */
    ResponseMessage getOpenStatus(GataWayDomain gataWayDomain);

    /**
     * 设置开关状态
     * @return
     */
    Boolean setOpenStatus(GlrGateWayOpenSatusDomain glrGateWayOpenSatusDomain);

    /**
     * 获取IP地址
     * @return
     */
    public ResponseMessage getIP(GlrIPDomain ipdomain);
    /**
     * 设置IP地址
     * @return
     */
    Boolean setIP(GlrIPDomain ipdomain);

    /**
     * 获取网关数据
     * @return
     */
    ResponseMessage getGateWayMsg(GataWayDomain gataWayDomain);

    /**
     * 设置网关数据
     * @return
     */
    Boolean setGateWayMsg(GlrGateWayMsgDomain domain);

    /**
     * 设置测试数据
     * @return
     */
    Boolean setPacketLoss(GlrGateWayTestDomain glrGateWayTestDomain);

    /**
     * 获取测试结果
     * @return
     */
    ResponseMessage getPacketLoss(GataWayDomain gataWayDomain);

    /**
     * 获取经纬度
     * @return
     */
    ResponseMessage getGPS(GlrGateWayGpsDomain gataWayDomain);

    /**
     * 设置经纬度
     * @param glrGateWayGpsDomain
     * @return
     */
    Boolean setGPS(GlrGateWayGpsDomain glrGateWayGpsDomain);

    /**
     * 取得token
     * @return
     */
    String getToken();

    /**
     * 读取时段
     * @return
     */
    ResponseMessage getTimeFrameAndDimming(GataWayDomain gataWayDomain);


    /**
     * 读取路灯数据
     * @param gateWayCode
     * @return
     */
    Boolean readLightData(String gateWayCode);
    Boolean setTimeFrameAndDimming(GlrGateWayPatternDomain domain);
    Boolean setTimeFrameAndDimming(GlrPatternGateway domain);
    Boolean setTimeFrameAndDimming(GlrPattern pattern);


    /**
     * 设置光照
     * @param glrGateIlluminanceDomain
     * @return
     */
    Boolean setIlluminance(GlrGateIlluminanceDomain glrGateIlluminanceDomain);

    /**
     *获取光照
     * @return
     */
    ResponseMessage getIlluminance(GataWayDomain gataWayDomain);

    /**
     * 设置厂家设定
     * @param glrGateWayManufacturerSetDomain
     * @return
     */
    Boolean setManufacturerSet(GlrGateWayManufacturerSetDomain glrGateWayManufacturerSetDomain);

    /**
     *获取厂家设定
     * @return
     */
    ResponseMessage getManufacturerSet(GataWayDomain gataWayDomain);


    /**
     * 设置额定功率
     * @param glrGateWayRatedPowerDomain
     * @return
     */
    Boolean setRatedPower(GlrGateWayRatedPowerDomain glrGateWayRatedPowerDomain);

    /**
     *获取额定功率
     * @return
     */
    ResponseMessage getRatedPower(GataWayDomain gataWayDomain);


    /**
     * 读取分控地址
     * @param gataWayDomain
     * @return
     */
    ResponseMessage readLightAddress(GataWayDomain gataWayDomain);

    /**
     * 写入分控地址
     * @param glrLightGateAddressDomain
     * @return
     */
    Boolean setLightAddress(GlrLightGateAddressDomain glrLightGateAddressDomain);

    /**
     * 设置系统重启
     * @param glrGateWaySystemRestartDomain
     * @return
     */
    Boolean setSystemRestart(GlrGateWaySystemRestartDomain glrGateWaySystemRestartDomain);
    /**
     * 读取版本号
     * @param gataWayDomain
     * @return
     */
    ResponseMessage getVersionNo(GataWayDomain gataWayDomain);


    /**
     * 读取功率
     * @param gataWayDomain
     * @return
     */
    ResponseMessage readLightRatedPower(GataWayDomain gataWayDomain);

    /**
     * 设置功率
     * @param glrLightGateRatedPowerDomain
     * @return
     */
    Boolean setLightRatedPower(GlrLightGateRatedPowerDomain glrLightGateRatedPowerDomain);

    /**
     * 固件更新
     * @param glrLightGateFirmwareUpdateDomain
     * @return
     */
    Boolean setFirmwareUpdate(GlrLightGateFirmwareUpdateDomain glrLightGateFirmwareUpdateDomain);

    /**
     * 设置分控MAC
     * @param glrGateWaySubControlMACDomain
     * @return
     */
    Boolean setSubControlMAC(GlrGateWaySubControlMACDomain glrGateWaySubControlMACDomain);

    /**
     *  读取分控MAC
     * @param gataWayDomain
     * @return
     */
    ResponseMessage getSubControlMAC(GataWayDomain gataWayDomain);


    /**
     * 读取相位
     * @param gataWayDomain
     * @return
     */
    ResponseMessage readLightPhase(GataWayDomain gataWayDomain);

    /**
     * 设置相位
     * @param glrLightGatePhaseDomain
     * @return
     */
    Boolean setLightPhase(GlrLightGatePhaseDomain glrLightGatePhaseDomain);
}
